<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<img id="logo" src="/resources/image/logo.png" alt="realtyreg" onclick="document.location='/';">
<ul id="navList">
    <sec:authorize access="isAuthenticated()" var="isAuthenticated"/>
    <c:choose>
        <c:when test="${isAuthenticated}">
            <li onclick="window.location='/news'"><spring:message code="label.header.news"/></li>
            <li onclick="window.location='/realty'"><spring:message code="label.header.heap"/></li>
            <li onclick="window.location='/ownerbase'"><spring:message code="label.header.ownerbase"/></li>
            <li onclick="window.location='/legislation'"><spring:message code="label.header.legislation"/></li>
            <li onclick="window.location='/questions'"><spring:message code="label.header.questions"/></li>
            <li onclick="window.location='/discussion'"><spring:message code="label.header.discussion"/></li>
            <li onclick="window.location='/logout'"><spring:message code="label.header.logout"/></li>
        </c:when>
        <c:otherwise>
            <li onclick="window.location='/register'"><spring:message code="label.registration"/></li>
        </c:otherwise>
    </c:choose>
</ul>